]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st-box-layout: Fix Cogl deprecations
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 21 Feb 2015 01:02:56 +0000 (17:02 -0800)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sat, 21 Feb 2015 01:40:46 +0000 (17:40 -0800)
src/st/st-box-layout.c

index cb4917f209645e8432ed90f54e1a5a26d215a7d6..63e2ff717ee99424b908e01ea4a187f1766a83d8 100644 (file)
@@ -387,19 +387,20 @@ st_box_layout_paint (ClutterActor *actor)
   ClutterActorBox allocation_box;
   ClutterActorBox content_box;
   ClutterActor *child;
+  CoglFramebuffer *fb = cogl_get_draw_framebuffer ();
 
   get_border_paint_offsets (self, &x, &y);
   if (x != 0 || y != 0)
     {
-      cogl_push_matrix ();
-      cogl_translate ((int)x, (int)y, 0);
+      cogl_framebuffer_push_matrix (fb);
+      cogl_framebuffer_translate (fb, (int)x, (int)y, 0);
     }
 
   st_widget_paint_background (ST_WIDGET (actor));
 
   if (x != 0 || y != 0)
     {
-      cogl_pop_matrix ();
+      cogl_framebuffer_pop_matrix (fb);
     }
 
   if (clutter_actor_get_n_children (actor) == 0)
@@ -417,10 +418,11 @@ st_box_layout_paint (ClutterActor *actor)
    * the borders and background stay in place; after drawing the borders and
    * background, we clip to the content area */
   if (priv->hadjustment || priv->vadjustment)
-    cogl_clip_push_rectangle ((int)content_box.x1,
-                              (int)content_box.y1,
-                              (int)content_box.x2,
-                              (int)content_box.y2);
+    cogl_framebuffer_push_rectangle_clip (fb,
+                                          (int)content_box.x1,
+                                          (int)content_box.y1,
+                                          (int)content_box.x2,
+                                          (int)content_box.y2);
 
   for (child = clutter_actor_get_first_child (actor);
        child != NULL;
@@ -428,7 +430,7 @@ st_box_layout_paint (ClutterActor *actor)
     clutter_actor_paint (child);
 
   if (priv->hadjustment || priv->vadjustment)
-    cogl_clip_pop ();
+    cogl_framebuffer_pop_clip (fb);
 }
 
 static void
@@ -442,19 +444,20 @@ st_box_layout_pick (ClutterActor       *actor,
   ClutterActorBox allocation_box;
   ClutterActorBox content_box;
   ClutterActor *child;
+  CoglFramebuffer *fb = cogl_get_draw_framebuffer ();
 
   get_border_paint_offsets (self, &x, &y);
   if (x != 0 || y != 0)
     {
-      cogl_push_matrix ();
-      cogl_translate ((int)x, (int)y, 0);
+      cogl_framebuffer_push_matrix (fb);
+      cogl_framebuffer_translate (fb, (int)x, (int)y, 0);
     }
 
   CLUTTER_ACTOR_CLASS (st_box_layout_parent_class)->pick (actor, color);
 
   if (x != 0 || y != 0)
     {
-      cogl_pop_matrix ();
+      cogl_framebuffer_pop_matrix (fb);
     }
 
   if (clutter_actor_get_n_children (actor) == 0)
@@ -469,10 +472,11 @@ st_box_layout_pick (ClutterActor       *actor,
   content_box.y2 += y;
 
   if (priv->hadjustment || priv->vadjustment)
-    cogl_clip_push_rectangle ((int)content_box.x1,
-                              (int)content_box.y1,
-                              (int)content_box.x2,
-                              (int)content_box.y2);
+    cogl_framebuffer_push_rectangle_clip (fb,
+                                          (int)content_box.x1,
+                                          (int)content_box.y1,
+                                          (int)content_box.x2,
+                                          (int)content_box.y2);
 
   for (child = clutter_actor_get_first_child (actor);
        child != NULL;
@@ -480,7 +484,7 @@ st_box_layout_pick (ClutterActor       *actor,
     clutter_actor_paint (child);
 
   if (priv->hadjustment || priv->vadjustment)
-    cogl_clip_pop ();
+    cogl_framebuffer_pop_clip (fb);
 }
 
 static gboolean